<template>
	<view class="charts-box">
		<qiun-data-charts
			type="line"
			:chartData="salesData"
			:opts="lopts"
			background="none"
			:loadingType="4"
		/>
	</view>
</template>

<script>
	export default {
		props: {
			current: {
				type: Number,
				default: 0
			},
			salesData: {
				type: Object,
				default: {}
			},
		
		},
		created() {
			console.log('折线图数据---》',this.salesData);
		},
		data() {
			return {
				lopts: {
					color: ['#FF551A'],
					dataLabel: false,
					fontColor: '#999999',
					fontSize: 11,
					dataPointShape: false,
					legend: {
						show: false,
					},
					xAxis: {
						disableGrid: false,
						gridColor: '#EEEEEE'
					},
					yAxis: {
						gridColor: '#EEEEEE'
					},
					extra: {
						line: {
							width: 6,
						},
					}
				},
				copts: {
					color: ['#666666', '#FFBB1A', '#FF551A'],
					dataLabel: false,
					fontColor: '#999999',
					fontSize: 11,
					yAxis: {
						disableGrid: false,
						gridColor: '#eeeeee',
					},
					legend: {
						float: 'center',
						show:false,
					},
					extra: {
						column: {
							width: 5,
							barBorderCircle: true,
							seriesGap: 6,
							categoryGap: 8,
							linearType: "custom",
							customColor: ['#666666', '#FFBB1A', '#FF551A']
						},
					}
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.charts-box{
		min-height: 300rpx;
	}
</style>
